package com.isoft.dao.tabledao;

import com.isoft.entity.tableentity.dfme_cfce.DfmeCfceDflt;
import com.isoft.entity.tableentity.dfme_cfce.DfmeCfceMeta;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;

@Mapper
public interface DfmeCfceDao {
    @Insert("insert into TEAM04.COMMON_META( create_time, sndr, rcvr, seqn, ddtm, type, styp) " +
            "values( #{create_time}, #{meta.sndr}, #{meta.rcvr}, #{meta.seqn}," +
            " #{meta.ddtm}, #{meta.type}, #{meta.styp})")
    public int insertMeta(@Param("create_time") Timestamp create_time,
                          @Param("meta") DfmeCfceMeta dfmeCfceMeta);

    @Insert("insert into TEAM04.DFME_CFCE(meta_id,create_time,flid,ffid,fide,cftp,cfno) " +
            "values(#{meta_id},#{create_time},#{dflt.flid},#{dflt.ffid},#{dflt.fide},#{dflt.cftp},#{dflt.cfno})")
    public int insertDflt(@Param("meta_id") int meta_id, @Param("create_time") Timestamp create_time,
                          @Param("dflt") DfmeCfceDflt dfmeCfceDflt);
}
